<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});



//Route::get('/', 'Index\\AppController@index')->name('index');
Route::get('/details/{id}','Index\\AppController@details')->name('details');
Route::get('/category/{id}','Index\\AppController@category')->name('category');
Route::get('/search','Index\\AppController@search')->name('search');


Auth::routes();


Route::get('/oauth/github', 'Auth\LoginController@redirectToProvider')->name('oauth.github');
Route::get('/oauth/github/callback', 'Auth\LoginController@handleProviderCallback');



Route::get('/callback', function (Request $request) {
	
	return response()->json($request->code);
	
});

Route::get('/oauth/authorize','Auth\AuthorizationController@authorize')->middleware(['web', 'auth'])->name('passport.authorizations.authorize');


